//
//  YDYFanJuNewsView.m
//  DY_Bilibili
//
//  Created by 杨德勇 on 2016/9/29.
//  Copyright © 2016年 杨德勇. All rights reserved.
//

#import "YDYFanJuNewsView.h"
#import "YDYFanju.h"
#import <UIImageView+WebCache.h>
@interface YDYFanJuNewsView()
@property (weak, nonatomic) IBOutlet UIImageView *imgView;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;

@end


@implementation YDYFanJuNewsView
#warning what if net is not good;
-(void)setFanju:(YDYFanju *)fanju{
    _fanju = fanju;
    
    self.titleLabel.text = fanju.title;
    self.imgView.layer.cornerRadius = 10;
    self.imgView.clipsToBounds = YES;
    
    [self.imgView sd_setImageWithURL:[NSURL URLWithString:fanju.pic]];
    [self layoutIfNeeded];
}

@end
